From 2cb9ce954ebac37185c33b597dc6e0831b7b3f57 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 18 Apr 2011 19:51:50 +0200 Subject: [PATCH] [broadway] Remove old demo code --- gdk/broadway/Makefile.am | 3 - gdk/broadway/broadway-demo.c | 230 ----------------------------------- 2 files changed, 233 deletions(-) delete mode 100644 gdk/broadway/broadway-demo.c diff --git a/gdk/broadway/Makefile.am b/gdk/broadway/Makefile.am index a64d002a7b..3c58e1ee95 100644 --- a/gdk/broadway/Makefile.am +++ b/gdk/broadway/Makefile.am @@ -82,7 +82,4 @@ EXTRA_DIST += $(broadway_built_sources) BUILT_SOURCES = $(broadway_built_sources) -noinst_PROGRAMS = broadway-demo -broadway_demo_LDADD = -lz -lcairo libbroadway.la -lglib-2.0 - -include $(top_srcdir)/git.mk diff --git a/gdk/broadway/broadway-demo.c b/gdk/broadway/broadway-demo.c deleted file mode 100644 index 0ce3081ece..0000000000 --- a/gdk/broadway/broadway-demo.c +++ /dev/null @@ -1,230 +0,0 @@ -/* Build with - gcc -lm -lz -O2 -Wall `pkg-config --libs --cflags cairo` -o broadway broadway.c demo.c -*/ - -#include "broadway.h" -#include -#include -#include -#include - -static void -diff_surfaces (cairo_surface_t *surface, - cairo_surface_t *old_surface) -{ - uint8_t *data, *old_data; - uint32_t *line, *old_line; - int w, h, stride, old_stride; - int x, y; - - data = cairo_image_surface_get_data (surface); - old_data = cairo_image_surface_get_data (old_surface); - - w = cairo_image_surface_get_width (surface); - h = cairo_image_surface_get_height (surface); - - stride = cairo_image_surface_get_stride (surface); - old_stride = cairo_image_surface_get_stride (old_surface); - - for (y = 0; y < h; y++) - { - line = (uint32_t *)data; - old_line = (uint32_t *)old_data; - - for (x = 0; x < w; x++) - { - if ((*line & 0xffffff) == (*old_line & 0xffffff)) - *old_line = 0; - else - *old_line = *line | 0xff000000; - line ++; - old_line ++; - } - - data += stride; - old_data += old_stride; - } -} - -static void -snippet(cairo_t *cr, int i) -{ - if (1) - { - cairo_save(cr); - cairo_rotate (cr, i * 0.002); - /* a custom shape that could be wrapped in a function */ - double x0 = 25.6, /* parameters like cairo_rectangle */ - y0 = 25.6, - rect_width = 204.8, - rect_height = 204.8, - radius = 102.4; /* and an approximate curvature radius */ - - double x1,y1; - - x1=x0+rect_width; - y1=y0+rect_height; - if (rect_width/2